package com.huanzhidadi.java8inaction.predicate.impl;

import com.huanzhidadi.java8inaction.model.Apple;
import com.huanzhidadi.java8inaction.predicate.ApplePredicate;

/**
 * 对绿色苹果进行筛选
 */
public class AppleGreenColorPredicate implements ApplePredicate {
    @Override
    public boolean test(Apple apple) {
        return "green".equals(apple.getColor());
    }
}
